home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / nrpas13.zip / ERFCC.DEM < prev    next >
Text File  |  1991-04-29  |  575b  |  25 lines

  1. PROGRAM d6r12(input,output,dfile);
  2. (* driver for routine erfcc *)
  3. VAR
  4.    i,nval : integer;
  5.    x,val : real;
  6.    txt : string[14];
  7.    dfile : text;
  8.  
  9. (*$I MODFILE.PAS *)
  10. (*$I ERFCC.PAS *)
  11.  
  12. BEGIN
  13.    glopen(dfile,'fncval.dat');
  14.    REPEAT readln(dfile,txt) UNTIL (txt = 'Error Function');
  15.    readln(dfile,nval);
  16.    writeln ('complementary error function');
  17.    writeln ('x':5,'actual':12,'erfcc(x)':13);
  18.    FOR i := 1 to nval DO BEGIN
  19.       readln(dfile,x,val);
  20.       val := 1.0-val;
  21.       writeln (x:6:2,val:12:7,erfcc(x):12:7)
  22.    END;
  23.    close(dfile)
  24. END.
  25.